package com.sxt.practiceapplication.entity.course;

import com.google.gson.annotations.SerializedName;

import org.jetbrains.annotations.NotNull;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

public class CourseItem implements Serializable {

    private int id;

    private CourseType type;

    @SerializedName("course_title")
    private String courseTittle;

    @SerializedName("course_des")
    private String courseDes;

    @SerializedName("course_cover")
    private String courseCover;

    private Teacher teacher;

    @SerializedName("created_time")
    private String createdTime;


    public CourseItem(int id, String courseTittle, String courseDes) {
        this.id = id;
        this.courseTittle = courseTittle;
        this.courseDes = courseDes;
    }

    public CourseItem() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public CourseType getType() {
        return type;
    }

    public void setType(CourseType type) {
        this.type = type;
    }

    public String getCourseTittle() {
        return courseTittle;
    }

    public void setCourseTittle(String courseTittle) {
        this.courseTittle = courseTittle;
    }

    public String getCourseDes() {
        return courseDes;
    }

    public void setCourseDes(String courseDes) {
        this.courseDes = courseDes;
    }

    public String getCourseCover() {
        return courseCover;
    }

    public void setCourseCover(String courseCover) {
        this.courseCover = courseCover;
    }

    public Teacher getTeacher() {
        return teacher;
    }

    public void setTeacher(Teacher teacher) {
        this.teacher = teacher;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    @NotNull
    @Override
    public String toString() {
        return "CourseItem{" +
                "id=" + id +
                ", type=" + type +
                ", courseTittle='" + courseTittle + '\'' +
                ", courseDes='" + courseDes + '\'' +
                ", courseCover='" + courseCover + '\'' +
                ", teacher='" + teacher + '\'' +
                ", createdTime='" + createdTime + '\'' +
                '}';
    }

    public static class Teacher implements Serializable {
        private int id;
        private String nickname;


        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getNickname() {
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        @NotNull
        @Override
        public String toString() {
            return "Teacher{" +
                    "id=" + id +
                    ", nickname='" + nickname + '\'' +
                    '}';
        }
    }

    public static class CourseType implements Serializable {
        private int id;
        private String type;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        @Override
        public String toString() {
            return "CourseType{" +
                    "id=" + id +
                    ", type='" + type + '\'' +
                    '}';
        }
    }
}
